import * as mutation from '@/mutation/cookbookMutation'
/* 使用immutable数据的时候：只会拷贝你改变的节点，从而达到了节省性能。 */
import { fromJS } from 'immutable'

const initState = fromJS({
    swipers:[],
    cates:[],
    goodfoods:[]
})

export default(state = initState,{ type,data }) => {
    if(mutation[type]){
        return mutation[type](state,data)
    }else{
        return state
    }
}